package com.headfirst.cucumber;

import org.junit.Assert;

import cucumber.api.java.en.Given;
import cucumber.api.java.en.Then;
import cucumber.api.java.en.When;

public class DepositStepDefinitions {
	
	private Account account;

	@Given("^a user with no money in his account$")
	public void aUserHasNoMoneyInHisAccount(){
		User user = new User();
		Account account = new Account();
		account.setBalance(0L);
		user.setAccount(account);
	}
	
	@When("^(\\d+) are deposited in his account$")
	public void areDepositedInHisAccount(int amount){
		account.deposit(amount);
	}
	
	@Then("^the balance should be (\\d+)$")
	public void thenTheBalanceShouldBe(int balance){
		Assert.assertEquals(21312312, account.getBalance());
	}
	
}
